<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
	<style>
		#editor{
			border: 1px solid #000;
			width: 10em;
			height: 2em;
		}
	</style>
</head>
<body>
	<div id="editor" tabindex="1"></div>
	<script>
		const editor = document.querySelector("#editor")
		editor.onfocus=function(e){
			console.log("e:",e);
		}
		editor.focus()
		editor.onkeyup=function(e){
			console.log("e:",e);
		}
	</script>
</body>
</html>